import Vue from 'vue'
import App from './App'
import store from './store'
import util from './common/comutil/util.js';
import api from './common/api';
import common from './common/common' //全局混入
// 自定义组件
import TabBar from '@/components/common/tabbar.vue'
import MgImg from '@/components/common/mg-img.vue'
import MgCell from '@/components/common/mg-cell.vue'
import load from '@/components/common/load.vue'
import MyLine from "@/components/my-line.vue"
import myButton from "@/components/my-button.vue"
import MescrollMixin from '@/mescroll-uni/mescroll-mixins.js';
Vue.mixin(MescrollMixin)

//自定义属性
// Vue.prototype.$store = store
Vue.prototype.util = util
Vue.prototype.api = api
// Vue.prototype._ = _
Vue.config.productionTip = false

import bleSend from './common/bluetooth/bleSend.js';
import bleConnect from './common/bluetooth/bleConnect.js';
Vue.prototype.bleSend = bleSend
Vue.mixin(bleConnect)

Vue.use(common);
Vue.component('tab-bar', TabBar)
Vue.component('mg-img', MgImg)
Vue.component('mg-cell', MgCell)
Vue.component('mg-load', load)
Vue.component('MyLine', MyLine)
Vue.component('myButton', myButton)

// 引入全局uView
import uView from 'uview-ui';
Vue.use(uView);

// 全局验证方法
import validate from "@/common/validate/index.js"
// 公用方法
Vue.prototype.$validate = validate;

App.mpType = 'app'

const app = new Vue({
	store,
	...App
})
app.$mount()
